<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="http://localhost/e-shop/xiangqu/Application/Index/View/Orders/css/myOrder.css"/>
		<script src="http://localhost/e-shop/xiangqu/Static/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://localhost/e-shop/xiangqu/Static/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="http://localhost/e-shop/xiangqu/Static/hdjs/hdjs.css"/>
		<script type="text/javascript">
			var cancel = "<?php echo U('Index/Orders/cancelOrder');?>"
		</script>
		<script src="http://localhost/e-shop/xiangqu/Application/Index/View/Orders/js/myorder.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!--头部固定区-->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--头部固定区-->
<style type="text/css">
	#header .header_content .logined a{
		font: 400 14px/50px "微软雅黑";
	}
</style>
		<div id="header_fixed"></div>
		<div id="header">
			<div class="header_content">
				<div class="logo"><img src="http://localhost/e-shop/xiangqu/Application/Index/View/Orders/images/logo.png" alt="" /></div>
				<?php if(!isset($_SESSION['username'])): ?>
				<div class="login">
					<!--<a href=""><span></span></a>-->
					<a href="<?php echo U(('Index/Register/index'));?>">注册</a>
					<a href="<?php echo U(('Index/Login/index'));?>">登录</a>
				</div>
				<?php else:  ?>
				<!--已登录begin-->
				<div class="logined">
					<a href="<?php echo U('out');?>">退出</a>
					<a href="<?php echo U('Index/Orders/myOrder');?>">我的订单</a>
					<a href="<?php echo U('Index/Carts/index');?>">购物车</a>
					<a href="<?php echo U('Index/User/index');?>"><?php echo $_SESSION['nick'] ?></a>
					<a href="<?php echo U('Index/Orders/myOrder');?>" class="face"><img src="http://localhost/e-shop/xiangqu/<?php echo $face;?>" alt="" /></a>
				</div>
				<!--已登录end-->
				<?php endif  ?>
			</div>
		</div>
		<!--头部end-->
		<!--菜单栏begin-->
		<div id="nav">
			<div class="nav_content">
				<a href="<?php echo U('Index/Index/index');?>">首页</a>
				<?php foreach ($navData as $k=>$v){?>
				<a href="<?php echo U('Index/List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a>
				<?php }?>
				<div class="search">
					<form action="<?php echo U('Index/Search/index');?>" method="get">
						<input type="text" class="text" name="keys" placeholder="搜索" />
						<input type="submit" class="sbt" value=""/>
					</form>
				</div>
			</div>
		</div>
		<!--菜单栏end-->
		<!--菜单栏end-->
		
		<!--页面主体区域begin-->
		<div id="container">
			<div class="user">
				<div class="face"><img src="http://localhost/e-shop/xiangqu/<?php echo $face;?>" alt="" /></div>
				<div class="user_infor">
					<span class="name">诚心</span>
					<span class="gz"><span class="i_gz"></span>购物车<i style="color:red">&nbsp;&nbsp;<?php echo $cartCount;?></i></span>
					<span class="fs"><span class="i_fs"></span>订单<i style="color:red">&nbsp;&nbsp;<?php echo $orderCount;?></i></span>
					<span class="xh"><span class="i_xh"></span>喜欢&nbsp;&nbsp;<i style="color:red"><?php echo $myLikes;?></i></span>
				</div>
				<!--<div class="user_nav">
					<a href="">订单</a>
					<a href="">购物车</a>
					<a href="">分享</a>
					<a href="">消息</a>
				</div>-->
			</div>
			<div class="usergoods">
				<div class="ug_title">
					<a href="<?php echo U('Index/Orders/myOrder');?>">所有订单</a>
					<a href="<?php echo U('Index/Orders/myOrder',array('os'=>0));?>"     <?php if($_GET['os']==0){ ?>class="hover"<?php } ?> >待付款</a>
					<a href="<?php echo U('Index/Orders/myOrder',array('os'=>2));?>"     <?php if($_GET['os']==2){ ?>class="hover"<?php } ?>>待收货</a>
				</div>
				<?php foreach ($orderData as $k=>$v){?>
				<div class="ug_infor     <?php if($k!=0){ ?>b_top<?php } ?>">
					<div class="ug_time"><?php echo date('Y-m-d',$v['generatetime']);?></div>
					<div class="i_time"></div>
					<ul class="in_head">
						<li class="in_h_l1">商品编号</li>
						<li class="in_h_l2">数量</li>
						<li class="in_h_l3">价格</li>
						<li class="in_h_l4">订单状态</li>
					</ul>
					<ul class="in_cont">
						<li class="in_c_l1">
							<a href=""><img src="http://localhost/e-shop/xiangqu/<?php echo $v['pic'];?>"/></a>
							<a href="" class="desc"><span><?php echo $v['ogname'];?></span></a>
						</li>
						<li class="in_c_l2"><span><?php echo $v['buynum'];?></span></li>
						<li class="in_c_l3"><span><?php echo $v['price'];?></span></li>
						<li class="in_c_l4">
							    <?php if($v['state']==0){ ?>
							<a href="javascript:;" class='in_pay'>未付款</a>
							<a href="javascript:;" olid="<?php echo $v['olid'];?>" class="in_pay_cancel">取消订单</a>
							<?php } ?>
							    <?php if($v['state']==1){ ?>
							<a href="javascript:;" class="in_payed">已付款</a>
							<a href="javascript:;" class="in_payed">等待发货</a>
							<?php } ?>
							    <?php if($v['state']==2){ ?>
							<a href="javascript:;" class="in_payed">已付款</a>
							<a href="javascript:hd_modal_confirm(<?php echo $v['oid'];?>)" olid="<?php echo $v['olid'];?>" class="in_inform">确认收货</a>
							<?php } ?>
							    <?php if($v['state']==3){ ?>
							<a href="javascript:;" class="in_payed">已付款</a>
							<a href="javascript:;" olid="<?php echo $v['olid'];?>" class="in_payed">交易完成</a>
							<?php } ?>
							<!--<a href="in_order">订单详情</a>-->
						</li>
					</ul>
					<div class="pay_total">
						<p class="p1">订单编号：<?php echo $v['onumber'];?></p>
						<p class="p2">商品规格：<?php echo $v['spec'];?></p>
						<p class='p3'>合计:<span class='red'><?php echo $v['price'];?></span></p>
					</div>
				</div>
				<?php }?>
			</div>
		</div>
		<!--页面主体区域end-->
		
		<!--页面底部begin-->
		<div id="footer">
			<div class="foot_wrap">
				<div class="say">
					<p class="p1">“如果你的东西和大家都一样，那干嘛还设计它？”</p>
					<p class="p2">by  Philippe Starck</p>
				</div>
				<div class="foot_logo"></div>
				<p class='infor'>Copyright 2015 版权所有 浙ICP备12027496 <a href="">热门精选</a> <a href="">热门分类</a></p>
				<p class='link'>商务合作  友情链接： 想去网  蘑菇街 360安全网址 爱图购</p>
			</div>
		</div>
		<!--页面底部end-->
	</body>
	<script type="text/javascript">
	function hd_modal_confirm(id) {
        hd_modal({
            width: 400,//宽度
            height: 150,//高度
            title: '请确认已收货，否则有可能人财两空！',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.4,//背景透明度
            success: function () {//点击确定后的事件
				location.href = "http://localhost/e-shop/xiangqu/index.php/Index/Orders" + '/confirm/oid/' + id;
            },
            cancel: function () {//点击关闭后的事件
				
            }
        });
    }
</script>
</html>
